<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>React 二次体验</title>
    <!-- 1. 导入 -->
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
  </head>
  <body>
    <!-- 2 创建容器 -->
    <div id="root"></div>
    <script>
      // 3. react 元素创建
      let vdom = React.createElement(
        'div', 
        null, 
        React.createElement('h1', {title: '二次体验', id:'news'}, '五月天'), 
        React.createElement('p', {className: 'text'}, '因为痛苦太有价值，因为回忆太珍贵，所以我们更要继续往前走')
      );
      //4. 渲染 将 react 元素对象转为真实 DOM 对象, 插入到文档中
      ReactDOM.render(vdom, document.querySelector('#root'));

    </script>
  </body>
</html>
